jade.domain
Class FIPAServiceCommunicator

java.lang.Object
  |
  +--jade.domain.FIPAServiceCommunicator
Direct Known Subclasses:
AMSService, AMSServiceCommunicator, DFService, DFServiceCommunicator

public class FIPAServiceCommunicator
extends java.lang.Object

This class provides a set of basic and static methods to perform the FIPA Agent Management actions. However, developers should use DFService and AMSService which provide specialized methods to communicate with the DF and the AMS.

Author:
Fabio Bellifemine - CSELT S.p.A.

Constructor Summary
FIPAServiceCommunicator()
           
 
Method Summary
static ACLMessage doFipaRequestClient(Agent a, ACLMessage request)
          This method plays the initiator role in the Fipa-Request interaction protocol and performs all the steps of the protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FIPAServiceCommunicator

public FIPAServiceCommunicator()
Method Detail

doFipaRequestClient

public static ACLMessage doFipaRequestClient(Agent a,
                                             ACLMessage request)
                                      throws FIPAException
This method plays the initiator role in the Fipa-Request interaction protocol and performs all the steps of the protocol. Take care because the method blocks until all the response messages are received. Under error conditions, or if the responder does not wish to respond, that might block for ever the execution of the agent. For this reason, the FipaRequestInitiatorBehaviour is the preferred way to play the protocol.
Parameters:
a - is the Agent playing the initiator role
request - is the ACLMessage to be sent. Notice that all the slots of the message must have already been filled by the caller.
Returns:
the INFORM message received in the final state of the protocol, if the protocol succeeded, otherwise it throws an Exception